package com.example.gametestproject;

public class GameLevel {

	private int mGameMode;
	private int mLevelScore;//target score to pass this level
	private int mLevelNum;//current level number
	
	private int mCurScore;//
	private int mComboTimes;
	public GameMatrix mMatrix;
	
	public GameLevel(int iLevelNum, int iLevelScore)
	{
		this.mLevelNum = iLevelNum;
		this.mLevelScore = iLevelScore;
		this.mComboTimes = 0;
		this.mCurScore = 0;
		this.mMatrix = null;
	}
	
	public GameLevel(int iLevelNum, int iLevelScore, GameMatrix iMatrix)
	{
		this.reinit(iLevelNum, iLevelScore, iMatrix);
	}
	
	public void reinit(int iLevelNum, int iLevelScore, GameMatrix iMatrix)
	{
		this.mLevelNum = iLevelNum;
		this.mLevelScore = iLevelScore;
		this.mComboTimes = 0;
		this.mCurScore = 0;
		this.mMatrix = iMatrix;
	}
	
	public int getLevelNum()
	{
		return this.mLevelNum;
	}
	public void setLevelNum(int iNum)
	{
		this.mLevelNum = iNum;
	}
	
	public int getLevelScore()
	{
		return this.mLevelScore;
	}
	public void setLevelScore(int iScore)
	{
		this.mLevelScore = iScore;
	}
	
	public int getUserScore()
	{
		return this.mCurScore;
	}
	public void setUserScore(int iScore)
	{
		this.mCurScore = iScore;
	}
	public void addUserScore(int iIncrease)
	{
		this.mCurScore += iIncrease;
	}
	
	public int getComboTimes()
	{
		return this.mComboTimes;
	}
	public void setComboTimes(int iTimes)
	{
		this.mComboTimes = iTimes;
	}
	public void addComboTimes()
	{
		this.mComboTimes ++;
	}
	
	public int getGameMode()
	{
		return this.mGameMode;
	}
	public void setGameMode(int iMode)
	{
		this.mGameMode = iMode;
	}
	
	public boolean isLevelOver()
	{
		return this.mCurScore >= this.mLevelScore;
	}
	
	public void nextLevel()
	{
		MapManager.getInstance().createNewLevel(this);
	}
	
}
